package com.tjetc.controller;

import com.tjetc.domain.City;
import com.tjetc.domain.CityNoId;
import com.tjetc.service.CityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/city")
public class LoadCityController {
    @Autowired
    private CityService cityService;
    @RequestMapping("/no")
    public List<CityNoId> findAllCityNoId(){
        System.out.println("findAllCityNoId");
        return cityService.findAllCityNoId();
    }
    @RequestMapping("/all")
    public List<City> findAllCity(){
        System.out.println("findAllCity");
        return cityService.findAllCity();
    }
}
